import { Component, OnInit } from '@angular/core'
import { ActivatedRoute, Params } from '@angular/router'
import { Location } from '@angular/common'

@Component({
  selector: 'app-qrcode',
  templateUrl: './qrcode.component.html',
  styleUrls: ['./qrcode.component.scss']
})
export class QrcodeComponent implements OnInit {
  captcha = ''
  nick = ''

  constructor(private activatedRoute: ActivatedRoute, private location: Location) {}

  ngOnInit() {
    this.activatedRoute.queryParams.subscribe((params: Params) => {
      this.captcha = params.Captcha
      this.nick = params.Nick
    })
  }

  // 返回
  onClickLeft() {
    this.location.back()
  }
}
